const checkCode = (rule, value, callback) => {
  if (!value) {
    return callback(new Error("请输入地区编码"));
  }
  callback();
};
export default {
  name: [{ required: true, message: "请输入地区名称", trigger: ["blur", "change"] }],
  fullName: [{ required: true, message: "请输入地区全称", trigger: ["blur", "change"] }],
  type: [{ required: true, message: "请选择地图层级", trigger: ["blur", "change"] }],
  code: [{ required: true, validator: checkCode, trigger: ["blur", "change"] }],
};
